

import java.io.ObjectInputStream;
import java.io.ObjectOutputStream;
import java.net.InetAddress;
import java.net.Socket;

import com.androidbook.bro.Primitive_Joy;

public class Client_Object {
	private Primitive_Joy Joy = new Primitive_Joy();
	// private static String host = "192.168.101.1";
	private static int port = 8198;
	ObjectOutputStream oos = null;
	ObjectInputStream ois = null;
	private int status = 1;

	public Client_Object() {
		try {
			Socket client_socket = new Socket(InetAddress.getLocalHost(), port);

			ObjectInputStream ois = new ObjectInputStream(
					client_socket.getInputStream());

			ObjectOutputStream oos = new ObjectOutputStream(
					client_socket.getOutputStream());
			Joy.keyFilling();
			int i = 1;
			while (true) {
				oos.writeObject(1);
				oos.reset();
				oos.writeObject(Joy);
				oos.reset();
				Joy.keyFilling("UP", i);
				++i;
			}

		} catch (Exception e) {
			System.out.println("Exception " + e);
		}
	}

	public static void main(String args[]) {
		Client_Object lsp = new Client_Object();
	}

}